package com.cskaoyan.mapper;

import com.cskaoyan.bean.CskaoyanmallGoods;
import com.cskaoyan.bean.CskaoyanmallGoodsExample;

import java.util.List;

import com.cskaoyan.bean.vo.WXGoodsRelatedVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CskaoyanmallGoodsMapper {
    long countByExample(CskaoyanmallGoodsExample example);

    int deleteByExample(CskaoyanmallGoodsExample example);

    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(CskaoyanmallGoods record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(CskaoyanmallGoods record);

    List<CskaoyanmallGoods> selectByExample(CskaoyanmallGoodsExample example);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    CskaoyanmallGoods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CskaoyanmallGoods record, @Param("example") CskaoyanmallGoodsExample example);

    int updateByExample(@Param("record") CskaoyanmallGoods record, @Param("example") CskaoyanmallGoodsExample example);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(CskaoyanmallGoods record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(CskaoyanmallGoods record);

    List<WXGoodsRelatedVO> selectGoodsRelated(Integer categoryId);
    /**
     *
     * @return 最后插入的商品
     */
    int selectLastInsert();

    Long selectNum();

}